import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void fun(int x) {
        x=20;
        System.out.println("x="+x);
    }
    public static void fun1(int[]array) {
        array=new int[]{1,2,3};
    }
    public static void fun2(int[]array) {
        array[0]=100;
    }
public static int[] Fib(int n) {
    if(n <= 0){
        return null;
    }
        int []array=new int[n];
        array[0]=1;
        array[1]=1;
    for (int i = 2; i <n ; i++) {
        array[i]=array[i-1]+array[i-2];
    }
        return array;
}
    public static int[] fun3() {
         int[]p=new int[]{1,2,3,4};
         return p;
    }
    public static void main(String[] args) {
        int[]array1=fun3();
        System.out.println(Arrays.toString(array1));
    }
    public static void main6(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int a=scanner.nextInt();
       int[]array= Fib(a);
        System.out.println(Arrays.toString(array));
    }
    public static void main5(String[] args) {
        int[]array1={1,2,3,4};
       // fun1(array1);
        fun2(array1);
        System.out.println(Arrays.toString(array1));

    }
    public static void main4(String[] args) {
        int a=10;
        fun(a);
        System.out.println("a="+a);
    }
    public static void main3(String[] args) {
    int[]array={1,2,3};
        for (int i = 0; i <array.length ; i++) {
            System.out.print(array[i]+" ");
        }
    }

    public static void main2(String[] args) {
        int[]array1={1,2,3,4};
        int[]array2={11,22,33,44};
        array1=array2;
        array1[0]=1234;
        System.out.println(Arrays.toString(array1));
        System.out.println(Arrays.toString(array2));
    }
    public static void main1(String[] args) {
        int[]array1={1,2,3,4};
        array1[0]=99;
        int[]array2=array1;
        array2[0]=100;
        System.out.println(Arrays.toString(array1));
        System.out.println(Arrays.toString(array2));
     }
}
